#ifndef __BINARYTREE_H_
#define __BINARYTREE_H_
#include <stdio.h>
#include <stdlib.h>
#define ERROR_CHECK(ret, num, msg) \
    {                              \
        if (ret == num)            \
        {                          \
            perror(msg);           \
            exit(1);               \
        }                          \
    }
#define OUT(t) {printf("%c ",t);}
#define IN(t) {scanf("%c",&t);}
 
typedef char type;
typedef struct binaryTree
{
    type data;
    struct binaryTree *lchild;
    struct binaryTree *rchild;
} TREE;
/**
 * @brief Create a tree object
 * 
 * @return TREE* 
 */
TREE *create_treeDLR();

void DLR_show(TREE*root);

void LDR_show(TREE *root);

void LRD_show(TREE *root);

void level_showQueue(TREE *root);

void level_showArry(TREE *root);

void levelShow(TREE *root);
void freeTreeLRD(TREE **root);

#endif
